package com.yqy.spring.dynamic;

import com.yqy.spring.service.OrderService;

import java.lang.reflect.Proxy;

public class ProxyUtil {
    public static OrderService newProxyInstance(OrderService target){
        return (OrderService)Proxy.newProxyInstance(target.getClass().getClassLoader(),target.getClass().getInterfaces(),new TimerInvocationHandler(target));
    }
}
